how to find 1st small and 2nd small value